﻿using System;

namespace AIFSContentManagementSystem
{
    /// <summary>
    /// Interface is used by all users of repositories to gain access to other repositories
    /// </summary>
    public interface IRepositoryMap
    {
        /// <summary>
        /// Gets the repository based on it's type.
        /// </summary>
        /// <typeparam name="T">A type derieved from IRepository</typeparam>
        /// <returns>A IRepository derieved obect.</returns>
        T Get<T>() where T : IRepository;

        /// <summary>
        /// By default lazy loadig should be enabled.
        /// If this is true, load child objects eagerly.
        /// </summary>
        bool DisableLazyLoad { get; set; }
    }
}
